import http from "../index";

// 新增常用语
export const addCyy = (data) =>
  http({
    url: "/api/cyy/addCyy",
    method: "post",
    data,
  });

// 删除常用语
export const deleteCyyById = (params) =>
  http({
    url: "/api/cyy/deleteCyyById?" + params,
    method: "get",
  });

// 批量删除常用语
export const deleteBatch = (data) =>
  http({
    url: "/api/cyy/deleteBatch",
    method: "Delete",
    data,
  });

// 编辑常用语
export const updateCyy = (data) =>
  http({
    url: "/api/cyy/updateCyyById",
    method: "post",
    data,
  });

// 查询类型为评估目的的常用语
export const getCyyByPgmd = () =>
  http({
    url: "/api/cyy/getCyyByPgmd",
    method: "get",
  });

// 查询全部常用语，分页
export const getCyyWithPage = (data) =>
  http({
    url: "/api/cyy/getCyyWithPage",
    method: "post",
    data,
  });

// 模糊查询
export const getCyyByAll = (params) =>
  http({
    url: "/api/cyy/getCyyByAll?" + params,
    method: "get",
  });

// 常用语分组管理

// 新增分组
export const addCyyfz = (data) =>
  http({
    url: "/api/cyyfz/addCyyfz",
    method: "post",
    data,
  });

// 删除分组
export const deleteCyyfz = (params) =>
  http({
    url: "/api/cyyfz/deleteCyyfzByfzId?" + params,
    method: "get",
  });

// 批量删除常用语分组
export const deleteBatchCyyfz = (data) =>
  http({
    url: "/api/cyy/deleteBatch",
    method: "Delete",
    data,
  });

// 编辑常用语分组
export const updateCyyfz = (data) =>
  http({
    url: "/api/cyyfz/updateCyyfzById",
    method: "post",
    data,
  });

// 查询常用语分组，带分页
export const getCyyfzWithPage = (data) =>
  http({
    url: "/api/cyyfz/getCyyfzWithPage",
    method: "post",
    data,
  });

// 模糊查询
export const getCyyfzByAll = (params) =>
  http({
    url: "/api/cyyfz/getCyyfzByAll?" + params,
    method: "get",
  });

export const getOrSearch = (params) => http({
  url: "/api/jdcpg/cword/getOrSearch?" + params,
  method: "get"
});
export const saveOrUpdate = (data) => http({
  url:"/api/jdcpg/cword/saveOrUpdate",
  method:"post",
  data,
})
export const deleteCyy = (params) => http({
  url: "/api/jdcpg/cword/delete?" + params,
  method: "get"
})

export const inputSearch = (params) => http({
  url: "/api/jdcpg/cword/inputSearch?" + params,
  method: "get"
})
